<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<body>
<!--左侧导航开始-->
<nav th:fragment="menu" class="navbar-default navbar-static-side" role="navigation">
    <div class="nav-close"><i class="fa fa-times-circle"></i>
    </div>
    <div class="sidebar-collapse">
        <ul class="nav" id="side-menu">
            <li class="nav-header">
                <div class="dropdown profile-element">
                    <span><img alt="image" class="img-circle" th:src="${sex == 1} ? '/img/boy.gif' : '/img/girl.gif'" /></span>
                    <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                        <span class="clear">
                       <span class="block m-t-xs"><strong class="font-bold" th:text="${userName}"></strong></span>
                        <span class="text-muted text-xs block" th:text="${deptName}">超级管理员<b class="caret"></b></span>
                        </span>
                    </a>
                    <ul class="dropdown-menu animated fadeInRight m-t-xs">
                        <li><a href="javascript:void(0)" onclick="Common.openEditPwd()">修改密码</a>
                        </li>
                        <li class="divider"></li>
                        <li><a href="/logout">安全退出</a>
                        </li>
                    </ul>
                </div>
                <div class="logo-element"><span><img alt="image" class="img-circle" th:src="${sex == 1} ? '/img/boy.gif' : '/img/girl.gif'" /></span>
                </div>
            </li>
            <li th:each="menu : ${menus}">
                <a th:class="${menu.url eq '#'} ? '' : 'J_menuItem'" th:href="${menu.url}">
                    <i th:class="'fa ' + ${menu.icon}"></i>
                    <span class="nav-label" th:text="${menu.name}"></span>
                    <span class="fa arrow" th:if="${not #lists.isEmpty(menu.children)}"></span>
                </a>
                <ul class="nav nav-second-level" th:if="${not #lists.isEmpty(menu.children)}">
                    <li th:each="children : ${menu.children}">
                        <a class="J_menuItem" th:href="${children.url}" th:text="${children.name}"></a>
                    </li>
                </ul>
            </li>
        </ul>
    </div>
</nav>
<!--左侧导航结束-->
</body>
</html>